#pragma once

#include "Contact.h"
#include "Group.h"

namespace kryptos { namespace cryptography {

class ContactsManager
{
public:
    virtual ~ContactsManager();

    static ContactsManager& manager();

    kryptos::entities::ContactList          allContacts();
    kryptos::entities::GroupList            allGroups();
    kryptos::entities::SymmetricKeyInfoList allSymmetricKeys();

    kryptos::entities::Group groupByName(const std::string& name);

    void addContactWithoutGroup(const kryptos::entities::Contact& contact);
    void addContactToGroup     (const kryptos::entities::Contact& contact, const kryptos::entities::Group& group);
    void addGroup              (const kryptos::entities::Group& group);

private:
    ContactsManager();

    kryptos::entities::Group m_defaultGroup;

};

}}
